#计科1814吕仁玲

import  random

fall = open("名单.txt","r",encoding="UTF-8")
all = fall.read()

list = all.split('\n')
len = len(list)
dg = 0
syu = 0
print("总人数%d" % len)

n = '1'
while n == '1':
    s = random.choice(list)
    list.remove(s)
    print("选中了：%s"% s)
    dg += 1
    syu = len -dg
    print("已经点了%d人，没有点的还有%d"%(dg,syu))

    a = open("新名单.txt","w",encoding="UTF-8")
    for  x in list:
        a.write(x + '\n')
    a.close()

    if not list:
        print("点名结束")
    else:
        print("-"*20)
        n = input("是否继续点名：[0结束/1继续]")
        while n != '1' and n != '0':
            n = input("请输入正确选项[0/1]")